﻿using MengLin.OOP.DesignPattern.Visitor.StudentGetVdieo.Interface;
using MengLin.OOP.DesignPattern.Visitor.StudentGetVdieo.Visitor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.Visitor.StudentGetVdieo
{
    /// <summary>
    /// Vip学员
    /// </summary>
    public class StudentVip : Student
    {
        /// <summary>
        /// 获得视频
        /// </summary>
        public override void GetVideo()
        {
            if (DateTime.Now.ToFileTime() >= 11)//11点前
            {
                Console.WriteLine("免费获取全套的公开课视频的上集。");
            }
            else if (DateTime.Now.ToFileTime() >= 14)//14点前
            {
                Console.WriteLine("免费获取全套的公开课视频的中集。");
            }
            else if (DateTime.Now.ToFileTime() >= 17)//17点前
            {
                Console.WriteLine("免费获取全套的公开课视频的下集。");
            }
            Console.WriteLine("免费获取全套的公开课视频代码合集。");
        }

        /// <summary>
        /// 访问者的获得视频
        /// </summary>
        public override void GetVideoVistor(IVisitor iVistor)
        {
            iVistor.GetVideoVip(this);
        }
    }
}
